package com.jingdianjichi.wx.handler;

import com.jingdianjichi.wx.WxApplication;
import lombok.Getter;

/**
 * ClassName:WxChatMsgTypeEnum
 * Package:com.jingdianjichi.wx.handler
 * Description:
 *
 * @Author fst
 * @Create 2024/10/15 21:50
 * @Version 1.0
 */

public enum WxChatMsgTypeEnum
{
    SUBSCRIBE("event.subscribe","用户关注事件"),
    TEXT_MSG("text","接收用户文本信息");

    private String msgType;
    private String desc;

    WxChatMsgTypeEnum(String msgType,String desc)
    {
        this.msgType=msgType;
        this.desc=desc;
    }

    public static WxChatMsgTypeEnum getMsgType(String msgType)
    {
        for (WxChatMsgTypeEnum wxChatMsgTypeEnum : WxChatMsgTypeEnum.values()) {
              if(wxChatMsgTypeEnum.msgType.equals(msgType))
              {
                  return wxChatMsgTypeEnum;
              }
        }
        return null;
    }


}
